<template>
	<view class="content">
		<swiper class="swiper" 
		:autoplay="autoplay" 
		:duration="duration"
		indicator-dots>
			<swiper-item>
				<view class="swiper-item">
					<view class="swiper-item-img"><image src="@/static/image/entry/img1.png" mode="aspectFit"></image></view>
					<view class="item-title">{{platform=='ios'?$t('entry.title4'):$t('entry.title1')}}</view>
					<view class="item-content">{{platform=='ios'?$t('entry.content4'):$t('entry.content1')}}</view>
					<view class="btn">
						<overbtn :btnText="$t('entry.btn')" @btnAction="launchFlag" :fontSize="30" :propStyle="{borderRadius:'45rpx',width:'400rpx', height: '90rpx', color: '#0F0F0E', border: 'none'}" btnType="overline"></overbtn>
					</view>
				</view>
			</swiper-item>
			<swiper-item v-if="!(platform == 'ios' && (systemInfo.is_audited == undefined || systemInfo.is_audited == '0'))">
				<view class="swiper-item">
					<view class="swiper-item-img"><image src="@/static/image/entry/img2.png" mode="aspectFit"></image></view>
					<view class="item-title">{{platform=='andriod'?$t('entry.title5'):$t('entry.title2')}}</view>
					<view class="item-content">{{platform=='andriod'?$t('entry.content5'):$t('entry.content2')}}</view>
					<view class="btn">
						<overbtn :btnText="$t('entry.btn')" @btnAction="launchFlag" :fontSize="30" :propStyle="{borderRadius:'45rpx',width:'400rpx', height: '90rpx', color: '#0F0F0E', border: 'none'}" btnType="overline"></overbtn>
					</view>
				</view>
			</swiper-item>
			<swiper-item v-if="!(platform == 'ios' && (systemInfo.is_audited == undefined || systemInfo.is_audited == '0'))">
				<view class="swiper-item">
					<view class="swiper-item-img"><image src="@/static/image/entry/img3.png" mode="aspectFit"></image></view>
					<view class="item-title">{{$t('entry.title3')}}</view>
					<view class="item-content">{{$t('entry.content3')}}</view>
					<view class="btn">
						<overbtn :btnText="$t('entry.btn')" @btnAction="launchFlag" :fontSize="30" :propStyle="{borderRadius:'45rpx',width:'400rpx', height: '90rpx', color: '#0F0F0E', border: 'none'}" btnType="overline"></overbtn>
					</view>
				</view>
			</swiper-item>
		</swiper>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				background: ['color1', 'color2', 'color3'],
				autoplay: false,
				duration: 500,
				jumpover: '跳过',
				experience: '立即体验'
			}
		},
		computed: {
			platform() {
				return this.$store.getters.platform || ''
			},
			systemInfo() {
				return this.$store.getters.systemInfo || {}
			}
		},
		methods: {
			launchFlag: function(){
				/**
				 * 向本地存储中设置launchFlag的值，即启动标识；
				 */
				// uni.setStorage({
				// 		key: 'launchFlag',
				// 		data: true,
				// });
				uni.redirectTo({
					url: '/pages/home/home'
				});
				
			}
		}
	}
</script>
<style lang="scss" scoped>
	page,
	.content{
		width: 100%;
		height: 100%;
		background-size: 100% auto ;
		padding: 0;
		color:#0F0F0E;
	}
	.swiper{
		width: 100%;
		height: 100%;
		background: #FFFFFF;
	}
	.swiper-item {
		width: 100%;
		height: 100%;
		text-align: center;
		position: relative;
		display: flex;
		justify-content: center;
		flex-direction:column;
		.item-title {
			margin-top: 90rpx;
			font-size: 34rpx;
		}
		.item-content {
			margin:40rpx auto 0 auto;
			width: 500rpx;
			color:#AAAAAA;
			font-size: 28rpx;
		}
		.btn {
			margin:80rpx auto 0 auto;
			width: 400rpx;
			height: 90rpx;
		}
	}
	.swiper-item-img{
		width: 100%;
		height: auto;
		margin: 0 auto;
	}
	.swiper-item-img image{
		width: 700rpx;
	}
	/deep/ .uni-swiper-dot-active {
		width: 40rpx!important;
		border-radius: 7rpx;
	}
	/deep/ .uni-swiper-dot {
		width: 24rpx;
		border-radius: 7rpx;
	}
	/deep/ .uni-swiper-dots {
		margin-bottom: 60rpx;
	}
	.uniapp-img{
		height: 20%;
		background: #FFFFFF;
		display: flex;
		justify-content: center;
		align-items:center;
		overflow: hidden;
	}
	.uniapp-img image{
		width: 40%;
	}
	
	.jump-over,.experience{
		position: absolute;
		height: 60upx;
		line-height: 60upx;
		padding: 0 40upx;
		border-radius: 30upx;
		font-size: 32upx;
		color: #454343;
		border: 1px solid #454343;
		z-index: 999;
	}
	.jump-over{
		right: 45upx;
		top: 125upx;
	}
	.experience{
		right: 50%;
		margin-right: -105upx;
		bottom: 0;
	}
</style>
